package com.car.advertising.view.viewAdapter;

import android.content.Context;
import android.support.v7.widget.GridLayoutManager;

/**
 * 开发者：LuoYi
 * Time: 2017 15:12 2017/5/4 05
 */

public class CustomLinearLayoutManager extends GridLayoutManager {

    private boolean isScrollEnabled = true;

    public CustomLinearLayoutManager(Context context, int spanCount) {
        super(context, spanCount);
    }

    public void setScrollEnabled(boolean flag) {
        this.isScrollEnabled = flag;
    }

    @Override
    public boolean canScrollVertically() {
        return isScrollEnabled && super.canScrollVertically();
    }
}
